<!-- 朋友验证 -->
<template>
  <div id="FriendsValidation">
    <!-- 头部 -->
    <Head
      title="朋友验证"
      BackType1="true"
      NoticeType11="true"
      TxtRight="发送"
      v-on:CustomEvevt="Validation"
    ></Head>
    <!-- 主体 -->
    <div id="Main">
      <span class="PartitionText">你需要发送验证申请，等待对方通过</span>
      <van-field v-model="Greetings" clearable></van-field>
    </div>
  </div>
</template>

<script>
import Head from "../components/Head";
import { Field } from "vant";
import { Toast } from "vant";

export default {
  data() {
    return {
      Greetings: ""
    };
  },
  components: {
    Head,
    [Field.name]: Field,
    [Toast.name]: Toast
  },
  methods: {
    Validation() {
      Toast.loading({
        mask: true,
        message: "发送中...",
        onClose: () => {
          this.$post(urlConfig.addFriend, {
            friendId: parseInt(this.$route.query.id),
            // friendId:"imid_adcf2b64b",
            notice: String(this.Greetings)
          }).then(res => {
            console.log(res);
          });
        }
      });
    }
  }
};
</script>

<style scoped lang="less">
#FriendsValidation {
  font-size: 28px;
  #Main {
    position: fixed;
    top: 88px;
    overflow: scroll;
    width: 100%;
    .PartitionText {
      display: block;
      padding-left: 30px;
      margin-top: 19px;
      margin-bottom: 17px;
      font-size: 24px;
      color: #888888;
    }
  }
}
</style>
<style>
.van-field__control {
  line-height: 2;
}
.van-cell:not(:last-child)::after {
  border-bottom: none;
}
</style>